Color enhancement is a known art in the field of consumer electronics to enhance the appearance of an image (still or video) to look more vibrant by artificially shifting the colors corresponding to real-life objects towards what the human eye and the human persona commonly associate with beauty. For example, a field of grass or a piece of foliage naturally appearing as pale green may be artificially shifted to a more saturated green to make the field or foliage appear fresher and more verdant. A pale blue sky may be artificially shifted towards a more saturated blue to make the sky appear more vibrant and clear. Similarly, pallid human skin may be artificially shifted to a more reddish brown, causing the human skin appear to have a healthier complexion. Accordingly, circuitry has been developed to detect programmable regions of blue, green, and skin and to perform a programmable shift when the regions are detected.
Blue, green and skin enhancements are the usual color enhancements performed in the industry. In conventional techniques, images may be encoded as a plurality of pixels, each pixel having a color. In order to perform the color enhancement of an image, the colors of the pixels comprising the image must be detected. Specifically, a determination must be made whether a given pixel in the image has the color of interest (e.g., blue, green and “skin color”). After a pixel having a color of interest is detected, the color value of that pixel is multiplied and/or shifted by a certain amount.
The detection and the shift are usually performed in the YCbCr color space. A YCbCr space is a 3 dimensional space where Y is the monochrome component pertaining to the brightness or luminance of the image, and the Cb-Cr plane corresponds to the color components of the image for a particular value of luminance. Typically, the Cb-Cr color plane comprises a vertical axis (Cr) and a horizontal axis (Cb). For many luminance values, the color green can be largely detected if the value of a pixel's color component falls in the 3rd quadrant (Cb<0, Cr<0). Similarly, the color blue is largely detected in the 4th quadrant (Cb>0, Cr<0). Likewise, skin color is usually detected somewhere in the second quadrant (Cb<0, Cr>0).
According to conventional methods, a region (typically a triangle for green or blue, and a trapezoid for skin) is defined in a Cb-Cr color plane as a region of interest, and a second, corresponding region (of the same shape as the region of interest) is defined in the same Cb-Cr color plane as the shift region. Any pixel which is detected in the region of interest is thus shifted to a corresponding position in the shift region. As regions of interest and shift regions may overlap in some portions, a pixel may be shifted to be in another position in the region of interest. Shifts may be executed as a vector shift, such that every position in a region of interest is shifted in the magnitude and direction by the same vector.
The programmable parameters for blue and green enhancement typically include: (i) the regions of interest (e.g., “detection regions”) based on the side lengths of the triangle and the offset from the origin (O), and (ii) the shift out vector towards more lively green or blue. For skin, the detection is based on parameters such as the shift from the origin, the length of the sides of the trapezoid, and the angle of location with respect to the vertical (Cr) axis. Enhancement for skin is a vector that either specifies an inward squeeze of that trapezoidal area (e.g., to make it conform to a narrower range of widely preferred skin hue) or a shift towards red (e.g., to make the skin more livid).
For a given set of values for the parameters, conventional methods of detection and shift are performed independently of Y (luminance). In other words, the detection region and the accompanying shift region will not vary along the luminance axis. Specifically, the same detection region and corresponding shift region (according to the same shift vector) will appear in the same relative positions in each Cb-Cr plane for each Y along the luminance axis. However, the positions of colors on the Cb-Cr planes vary along the luminance axis. For example, along the luminance axis, a color region does not always remain restricted to a fixed point, or even a fixed quadrant. Also, the shape of the color region of interest (to be enhanced) grows and shrinks along the luminance axis, and different colors are distributed dissimilarly in Cb-Cr planes along the luminance axis
Therefore, a color shade that occupies a certain region of the Cb-Cr plane for one value of luminance on the luminance axis may occupy a different region in the Cb-Cr plane at a different luminance value on the luminance axis. The color intensity also changes along the luminance axis, so that a color (e.g., green) which moves from dark (green) to light (green) along the luminance axis occupies varying regions on the Cb-Cr plane for varying luminance values, e.g., as one moves along the luminance axis Accordingly, a region of interest which includes the position of a color in a Cb-Cr plane for one luminance may not include the position of the same color in a Cb-Cr plane for another luminance. Thus, a detection region for one luminance that would detect a color and perform a shift for pixels pertaining to one color may not detect the color for another value of the luminance. Conversely, an unintended shift may be performed for a color which was outside the detection region for the original value of luminance, but whose position now lies within the detection region in the new value of luminance.
Furthermore, conventional methods are often restricted by several limitations which adversely affect their efficacy. For example, current methods for color enhancement are restricted to blue, green and skin enhancement. Color enhancement for other colors (e.g., red) is not available through conventional color enhancement techniques. Moreover, the shape of the detection regions and corresponding shift regions are typically invariable, and/or may also be invariable in size along the Y (luminance) axis. These limitations further exacerbate the issue of having undetected enhancement candidates and improper enhancements.